MLE-2554 TS for more documents functions#1038
Conversation
|
Copyright Validation Results ⏭️ Skipped (Excluded) Files
✅ Valid Files
✅ All files have valid copyright headers! |
There was a problem hiding this comment.
Pull request overview
This PR adds TypeScript definitions and runtime tests for additional document functions: removeAll, patch, protect, wipe, and advanceLsqt. It also enhances the write function to support temporal collections and adds the "temporal-admin" role to the rest-writer test user to enable temporal testing.
- Added TypeScript runtime tests for 5 new document functions with proper type validation
- Updated rest-writer user configuration to include temporal-admin role
- Added example temporal document operations to the test project
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| typescript-test-project/test.ts | Demonstrates temporal document operations including write, protect, and wipe |
| test-typescript/documents-runtime.test.ts | Adds comprehensive runtime tests for removeAll, patch, protect, wipe, and advanceLsqt functions |
| test-app/src/main/ml-config/security/users/rest-writer.json | Adds temporal-admin role to rest-writer user to enable temporal operations |
| .github/copilot-instructions.md | New file providing guidance for generating TypeScript definitions and runtime tests |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const writeResult = await client.documents.write({ | ||
| documents: [ | ||
| { | ||
| uri: temporalUri, content:temporalDoc, collections: ['other'], |
There was a problem hiding this comment.
Missing space after colon in 'content:temporalDoc'. Should be 'content: temporalDoc' for consistency with the rest of the codebase.
| */ | ||
|
|
||
| import should = require('should'); | ||
| const should = require('should'); |
There was a problem hiding this comment.
Changed from 'import should = require' to 'const should = require'. This is inconsistent with the TypeScript import pattern used elsewhere in the file for importing types (line 19). Consider using 'import should = require' for consistency, or provide a rationale for this change if intentional.
| const should = require('should'); | |
| import should = require('should'); |
Functions: removeAll, patch, protect, wipe, advanceLsqt, createWriteStream, and improved write as well. Added "temporal-admin" to the rest-writer test user. Which should allow for the currently-skipped temporal tests to be enabled soon.
3999897 to
765e9be
Compare
Functions: removeAll, patch, protect, wipe, advanceLsqt, and improved write as well.
Added "temporal-admin" to the rest-writer test user. Which should allow for the currently-skipped temporal tests to be enabled soon.